<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page isELIgnored ="false" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    response.setHeader("Cache-Control", "no-store"); //HTTP 1.1    
    response.setHeader("Pragma", "no-cache"); //HTTP 1.0    
    response.setDateHeader("Expires", 0); //prevents caching at the proxy server    
%>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <link rel="stylesheet" href="${applicationScope.webApp.root}/css/jquery.mobile.min.css" /> 
        <script src="${applicationScope.webApp.root}/js/jquery.min.js"></script>
        <script src="${applicationScope.webApp.root}/js/jquery.mobile.min.js"></script> 
        <style>
            body {
                background-color: rgb(221,221,221);
            }
        </style>
    </head>
    <body>
        <div data-role="page" id="page1">
            <div data-role="header">
                <h1>学生列表</h1>
                <a href="${applicationScope.webApp.root}/image?command=form" data-role="button" data-theme="a" data-icon="plus">上传Logo</a>
            </div>
            <div data-role="content">
                <div class="content-primary">
                    <ul data-role="listview" data-inset="true" data-split-icon="gear" data-split-theme="d" id="cai"> 
                        <li data-role="list-divider">${sessionScope.teacherInSession.teachername}</li>
                        <c:forEach items="${requestScope.students}" var="item">
                            <li>
                                <a href="${applicationScope.webApp.root}/student?command=learningStatus&userid=${item.userid}">
                                    <h3 class="ui-li-heading">${item.nickname}</h3>
                                    <p class="ui-li-desc">
                                        最后于
                                        <fmt:formatDate value="${item.lastLearningTime}" pattern="MM月dd日 HH:mm"/>
                                        背过单词
                                        &nbsp;&nbsp;&nbsp;&nbsp;${item.username}
                                    </p>
                                </a>
                            </li>
                        </c:forEach>
                    </ul> 
                </div><!--/content-primary -->
            </div><!-- /content -->
        </div><!-- /page --> 
    </body>
</html>
